 import React from "react";
import { RouterRow } from "../types";
import { WapHomeO , AppsO , CartO} from '@react-vant/icons';

const Car =React.lazy(()=>import('../views/car'))
const Classify =React.lazy(()=>import('../views/classify'))
const Detail =React.lazy(()=>import('../views/detail'))
const Home =React.lazy(()=>import('../views/home'))
const MainLayout =React.lazy(()=>import('../views/mainLayout'))
const Order =React.lazy(()=>import('../views/order'))


export const router_list_children:RouterRow[]=[
            {
                path:'/',
                element:<Home></Home>,
                title:'首页',
                icon:<WapHomeO  />
            },{
                path:'/car',
                element:<Car></Car>,
                title:'购物车',
                icon:<CartO  />
            },{
                path:'/classify',
                element:<Classify></Classify>,
                title:'商品',
                icon:<AppsO  />
            }
        ]



export const router_list:RouterRow[]=[
    {
        path:'/',
        element:<MainLayout></MainLayout>,
        title:'布局',
        children:router_list_children
    },{
        path:'/detail/:id',
        element:<Detail></Detail>,
        title:'详情',
    },{
        path:'/order',
        element:<Order></Order>,
        title:'支付',
    },
]
